An effective thought for solving the problem of segmenting motion foreground in a video is to compare each frame of images of the current video with a reference image representing background and calculate the difference there-between. In the initial solution, the reference image representing background generally is represented by a statistical model.
In a method, an independent single Gaussian model is established for each pixel based on the latest N frames of images, namely representing the background reference image by a statistical model in normal distribution.
In another method, a mixture Gaussian model is adopted, in which color distribution of one pixel is represented by a plurality of statistical models. This method allows the reference background model to have certain adaptability and learning capability. Regarding the motion and variation generated in the background image, the background model may learn the variation of background during update by updating model parameter and updating model weight, so as to reduce segment error. However, the background portion that is covered by shadow is not judged and processed in this method, so that it is easily to appear a large region that is segmented as foreground in a shadow projected by a motion foreground. In addition, since limitation of RGB color space and inconsideration of association between the adjacent pixels in frame images in the video in this method, an error usually appearing in the segmenting result is that some parts of the motion foreground object is segmented as background because the color value of said parts in RGB space is similar to the background model, so that there is cavity inside the background object.
In addition, a final segmenting result can be obtained by using the combination of segment of color information and segment of gradient information, and the segmenting result is improved during the variation of illumination condition by using the characteristic that the gradient is not sensitive to the variation of illumination, and then segment is carried out in three levels respectively, namely pixel-level, region-level and frame-level. This method uses a mixture Gaussian model in RGB space at pixel-level, and performs segment according to color information and gradient information respectively; a false foreground portion caused by the variation of illumination is excluded from the results of color segment and gradient segment when performing segment at region-level; the segment result based on color information is neglected and only the segment result based on gradient remains if the proportion of foreground region in the picture takes more than 50% during processing at frame-level finally. Compared with the improved method based on the mixture Gaussian model, said method can obtain a better result in the instances that the illumination varies slowly and the light varies instantaneously, so as to increase the adaptability of the foreground segment to the outer illumination variation. However, said method fails to process the cavity of the regions with similar color during segment of Gaussian model and to consider the association between the adjacent pixels.
In U.S. Pat. No. 0,194,131, a filter template is used to remove discrete segment noises. However, said method only uses a de-noising operation similar to morphology stiffly and fills up the cavity inside the foreground object very limitedly.
Furthermore, in U.S. Pat. No. 0,194,131, a segment is carried out by comparing the image after diverted into HSV space with background reference image. A modeling of a mixture Gaussian model may also be performed after diverting image from RGB color space to HSV space, and operations to image are performed in HSV space directly.
However, it is found from experimentation that H value and S value have greater fluctuation when color value of RGB space is converted into color value of HSV space, and H value becomes ineffective with respect to pixels with three equal components R, G, and B, so that components H and S are not stable when establishing a statistical model in HSV space, thereby relative more errors are generated.
Therefore, a system and method capable of solving the cavity inside the foreground object and improving the correctness of segment to background are required.